<?php

require_once $_SERVER['DOCUMENT_ROOT']."/../_lib/base/common.php";
require_once SITE_ROOT_PATH."/_lib/classes/class.template.php";


$template = new template();





/*
 * 
 * We need some logic to load the correct supplier class. For now I will just hard code the LCB class.
 * 
 */
require_once SITE_ROOT_PATH."/_lib/classes/class.hotel_supplier_low.php";
$hotelLow = new hotel_supplier_low();
session_start();
/*
 * 
 * The array keys should be consistetnly named. There should not be different keys for different suppliers.
 * 
 */
$hotel_id = $_GET['id'];
if (! $hotel_id){
   $hotel_a = $_SESSION['booking']['hotel'];    
   $hotel_id = $hotel_a['hotel_id_lowcostbeds'];
}
$hotel = $hotelLow->get_hotel_description($hotel_id);
$hotel = $hotel[0];


$hotel['name'] = $hotel['Property'];
$hotel['hotel_resort'] = $hotel['Resort'];
$hotel['hotel_destination'] = $hotel['Region'];
$hotel['rating'] = $hotel['Rating'];
$hotel['description'] = $hotel['Description'];
$hotel['thumbnail'] = $hotel['ThumbnailURL'];


$hotel['address'] = $hotel['Address'].', '.$hotel['Resort'].', '.$hotel['Region'].', '.$hotel['PostcodeZip'];
/*
 * 
 * Photos should be presented in an array NOT in seperate feilds.
 * 
 */
$photos = array($hotel['Image1URL'],$hotel['Image2URL'],$hotel['Image3URL']);


$template->title = "Hotel Description";
$template->meta_description = $hotel['name'].', '.$hotel['hotel_resort'];


$template->head_popup();

include SITE_ROOT_PATH."/_lib/html/popup_hotel_details.php";

$template->foot_popup();